#ifndef _CWAYPOINTCAMERA_H_
#define _CWAYPOINTCAMERA_H_

#include "CGlobals.h"

class CWaypointCameraAnimator : public ISceneNodeAnimator
{
public:
	CWaypointCameraAnimator (ICameraSceneNode* camera);

	bool isEventReceiverEnabled () const;
	bool OnEvent (const SEvent& event);

	void animateNode (ISceneNode* node, u32 timeMs);

	ISceneNodeAnimator* createClone () { return 0; }

	void setWaypoint (int waypoint);
	int getWaypoint () const;

private:
	void setAttribute (const c8* attribute, float value);
	void addToAttribute (const c8* attribute, float value);
	float getAttribute (const c8* attribute);

	ICameraSceneNode* m_camera;

	int m_waypoint;

	bool m_wheelPressed;
	bool m_rightMousePressed;
	position2di m_mouseStartPos;
	float m_startAngleX;
	float m_startAngleY;
	float m_startDistance;
};

#endif
